GoUni.controller('FeaturedCtrl', function ($scope, DataService) {
	
	$scope.translations = {
	};
	

  	$scope.init = function(university_id) {
		var featured_url = '/api/featured/';
		DataService.get(featured_url).then(function (data) {
			$scope.universities = data;
		}, function(status){
			console.log(status);
		});
			
  	};

	
})
.directive('postRepeatDirective', function () {
    return function (scope, element, attrs) {
        if (scope.$last) {
            var $container = $('.items');

            $container.imagesLoaded(function () {
                $container.isotope({
                    itemSelector: '.item'
                });
            });

            var resizeTimer;

            function resizeFunction() {
                $container.isotope('reLayout');
            }

            $(window).resize(function () {
                clearTimeout(resizeTimer);
                resizeTimer = setTimeout(resizeFunction, 100);
            });

            $('.portfolio .filter li a').click(function () {

                $('.portfolio .filter li a').removeClass('active');
                $(this).addClass('active');

                var selector = $(this).attr('data-filter');

                $container.isotope({
                    filter: selector
                });

                return false;

            });
        }
    };
});